package com.bootdo.common.utils;


import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;

public class OssConstant implements InitializingBean {

    @Value("${oss.file.endpoint}")
    private String oss_file_endpoint;

    @Value("${oss.file.endpoint2}")
    private String oss_file_endpoint2;

    @Value("${oss.file.endpointhistory_today}")
    private String oss_file_endpointhistory_today;

    @Value("${oss.file.history_domain_name}")
    private String oss_file_history_domain_name;

    @Value("${oss.file.endpoint_pop}")
    private String oss_file_endpoint_pop;

    @Value("${oss.file.keyid}")
    private String oss_file_keyid;

    @Value("${oss.file.keysecret}")
    private String oss_file_keysecret;

    @Value("${oss.file.filehost}")
    private String oss_file_filehost;

    @Value("${oss.file.filehost2}")
    private String oss_file_filehost2;

    @Value("${oss.file.filehost3}")
    private String oss_file_filehost3;

    @Value("${oss.file.bucketname}")
    private String oss_file_bucketname;

    @Value("${oss.file.bucketnamehistory_today}")
    private String oss_file_bucketnamehistory_today;

    @Value("${oss.file.bucketname_pop}")
    private String oss_file_bucketname_pop;

    @Value("${oss.file.filehosthistory_today}")
    private String oss_file_filehosthistory_today;

    @Value("${oss.file.jsadframefilehost}")
    private String oss_file_jsadframefilehost;

    @Value("${oss.file.filehost_pop}")
    private String oss_file_filehost_pop;

    @Value("${oss.file.bucketprefix}")
    private String oss_file_bucketprefix;

    @Value("${oss.file.filedir}")
    private String oss_file_filedir;

    @Value("${oss.file.filedir_pop}")
    private String oss_file_filedir_pop;


    public static String OSS_END_POINT;
    public static String OSS_END_POINT2; //热更endpoint
    public static String OSS_ENDPOINT_HISTORY_TODAY;//那年今日endpoint
    public static String OSS_ENDPOINT_POP; //弹窗endpoint
    public static String OSS_ACCESS_KEY_ID;
    public static String OSS_ACCESS_KEY_SECRET;
    public static String OSS_BUCKET_NAME;
    public static String OSS_FILE_HOST;
    public static String OSS_FILE_HOST2; //热更oss文件存放目录
    public static String OSS_FILE_HOST3;//广告图片配置oss文件存放目录
    public static String OSS_FILE_BUCKETPREFIX;
    public static String OSS_FILE_FILEDIR;
    //那年今日
    public static String OSS_BUCKETNAME_HISTORY_TODAY;
    public static String OSS_FILE_HOST_HISTORY_TODAY;
    public static String OSS_FILE_JSADFRAMEFILEHOST;
    public static String OSS_FILE_HISTORY_DOMAIN_NAME;//缓存域名

    //sdk_pop弹窗
    public static String OSS_BUCKETNAME_POP; //弹窗bucket
    public static String OSS_FILE_HOST_P0P; //弹窗oss存放路径
    public static String OSS_FILE_FILEDIR_POP; //弹窗服务器文件存放路径

    @Override
    public void afterPropertiesSet() throws Exception {
        OSS_END_POINT = oss_file_endpoint;
        OSS_END_POINT2 = oss_file_endpoint2;
        OSS_ACCESS_KEY_ID = oss_file_keyid;
        OSS_ACCESS_KEY_SECRET = oss_file_keysecret;
        OSS_FILE_HOST = oss_file_filehost;
        OSS_FILE_HOST2 = oss_file_filehost2;
        OSS_FILE_HOST3 = oss_file_filehost3;
        OSS_BUCKET_NAME = oss_file_bucketname;
        OSS_FILE_BUCKETPREFIX = oss_file_bucketprefix;
        OSS_FILE_FILEDIR = oss_file_filedir;
        //那年今日
        OSS_BUCKETNAME_HISTORY_TODAY = oss_file_bucketnamehistory_today;
        OSS_FILE_HOST_HISTORY_TODAY = oss_file_filehosthistory_today;
        OSS_FILE_JSADFRAMEFILEHOST = oss_file_jsadframefilehost;
        OSS_ENDPOINT_HISTORY_TODAY = oss_file_endpointhistory_today;
        //pop弹窗配置
        OSS_ENDPOINT_POP = oss_file_endpoint_pop;
        OSS_BUCKETNAME_POP = oss_file_bucketname_pop;
        OSS_FILE_HOST_P0P = oss_file_filehost_pop;
        OSS_FILE_FILEDIR_POP = oss_file_filedir_pop;
        OSS_FILE_HISTORY_DOMAIN_NAME = oss_file_history_domain_name;
    }
}
